#include <QApplication>
#include <QWebEngineView>


class Myobject:public QObject
{
    Q_OBJECT

public slots:
    onUrlChanged()
    {

    }
};

int main(int argc, char *argv[])
{
    QApplication a(argc, argv);
    QWebEngineView * pdev = new QWebEngineView();
    pdev->show();

    QWebEngineView * pv = new QWebEngineView();


    pv->setUrl(QUrl("http://www.baidu.com"));
    pv->show();
    pv->page()->setDevToolsPage(pdev->page());


    Myobject * pp = new Myobject();


    QObject::connect(pv, SIGNAL(urlChanged(QUrl)),pp, SLOT(onUrlChanged(QUrl)));


    return a.exec();
}
